package com.bitdf.txing.common.utils;

import org.springframework.data.redis.core.BoundHashOperations;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.serializer.StringRedisSerializer;

/**
 * @author Lizhiwei
 * @date 2022/9/15 21:40:34
 * 注释：
 */
public class RedisUtils {

    public static BoundHashOperations<String, Object, Object> getBoundOps(String key, StringRedisTemplate redisTemplate) {
        //绑定key,以后所有redis操作都针对此key
        BoundHashOperations<String, Object, Object> operation = redisTemplate.boundHashOps(key);
        return operation;
    }
}
